package com.uppfind.framework.core.dao.api.common.params;

import java.util.LinkedHashSet;
import java.util.Set;

public class DeleteParam<PK> {

    private Set<PK> deleteIds;

    public Set<PK> getDeleteIds() {
        return deleteIds;
    }

    public void setDeleteIds(Set<PK> deleteIds) {
        this.deleteIds = deleteIds;
    }

    public <PK> DeleteParam<PK> build(PK id) {
        DeleteParam deleteParam = new DeleteParam();
        Set<PK> idSet = new LinkedHashSet<>(1);
        idSet.add(id);
        deleteParam.setDeleteIds(idSet);
        return deleteParam;
    }

    public interface Property {
        /**
         * @see DeleteParam#deleteIds
         */
        String deleteIds = "deleteIds";
    }

}
